<template>
  <div class="app-taskinfo-toolbaritem">
    <v-menu
      v-model="isExpandSearchForm"
      offset-y
      transition="scale-transition"
      :close-on-content-click="false"
      max-width="17%"
    >
      <template v-slot:activator="menuSlot">
        <v-tooltip top>
          <template v-slot:activator="tipSlot">
            <v-btn
              depressed
              small
              color="white"
              v-bind="menuSlot.attrs"
              v-on="menuSlot.on"
            >
              <div v-bind="tipSlot.attrs" v-on="tipSlot.on">
                <i class="fa fa-filter fa-lg fa-fw"></i>
                <span style="color:grey">筛选</span>
              </div>
            </v-btn>
          </template>
          <span>筛选</span>
        </v-tooltip>
      </template>
      <slot name="searchform"></slot>
    </v-menu>
  </div>
</template>

<script lang="ts">
import {
  Vue,
  Component,
  Prop,
  Model,
  Emit,
  Watch,
  Provide,
} from "vue-property-decorator";

import "./app-taskinfo-toolbaritem.less";
import { Subject, Subscription } from "rxjs";
import ProjectService from "@/service/project/project-service";

import view_searchform from "@widgets/task/default-searchform/default-searchform.vue";

@Component({
  components: {
    view_searchform,
  },
})
export default class AppTaskinfoToolbarItem extends Vue {
  /**
   * 菜单绑定状态（是否显示搜索表单）
   *
   * @type {boolean}
   * @memberof AppTaskinfoToolbarItem
   */
  public isExpandSearchForm: boolean = true;

  public mounted(){
    let that: any = this;
    this.$nextTick(() => {
      that.isExpandSearchForm = false;
    });
  }
}
</script>
